<template>
  <el-table :data="list" style="width: 100%;padding-top: 15px;">
    <el-table-column label="用户id" width="100" align="center">
      <template slot-scope="scope">
        {{ scope.row.userId }}
      </template>
    </el-table-column>
    <el-table-column label="手机号" min-width="105" align="center">
      <template slot-scope="scope">
        {{ scope.row.phone }}
      </template>
    </el-table-column>
    <el-table-column label="注册时间" width="200" align="center">
      <template slot-scope="{row}">
        <el-tag :type="row.reg_datetime">
          {{ row.reg_datetime }}
        </el-tag>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
// import { transactionList } from '@/api/remote-search'
import { getPhoneUserList } from '@/api/user'
export default {
  filters: {
    statusFilter(status) {
      const statusMap = {
        success: 'success',
        pending: 'danger'
      }
      return statusMap[status]
    }
    // orderNoFilter(str) {
    //   return str.substring(0, 30)
    // }
  },
  data() {
    return {
      list: null
    }
  },
  created() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      getPhoneUserList().then(response => {
        this.list = response.data.data.records
        // this.list = response.data.items.slice(0, 8)
      })
    }
  }
}
</script>
